package jack.app.activepages;

import net.serenitybdd.core.pages.PageObject;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.ui.ExpectedConditions;

/**
 * @ClassName DeskPage
 * @Date 2024/11/12 16:13 58
 * @Author Jack Chen
 * @Description serenity-cucumber-app-ui-test-project
 * @Version 1.0
 */

public class DeskPage extends PageObject {

    public static final By AliCloudBox = By.xpath("//android.widget.RelativeLayout[@content-desc=\"阿里云盘\"]");
    public static final By AliCloud = By.xpath("//android.widget.RelativeLayout[@content-desc=\"阿里云\"]");
    public static final By AnJuKe = By.xpath("//android.widget.RelativeLayout[@content-desc=\"安居客\"]");
    public static final By KuGouMusic = By.xpath("//android.widget.RelativeLayout[@content-desc=\"酷狗音乐\"]");
    public static final By ZhiLianZhaoPin = By.xpath("//android.widget.RelativeLayout[@content-desc=\"智联招聘\"]");
    public static final By BossZhiPin = By.xpath("//android.widget.RelativeLayout[@content-desc=\"BOSS直聘\"]");
    public static final By QianChengWuYou = By.xpath("//android.widget.RelativeLayout[@content-desc=\"前程无忧51Job\"]");
    public static final By LaGouZhaoPin = By.xpath("//android.widget.RelativeLayout[@content-desc=\"拉勾招聘\"]");
    public static final By WeiPinHui = By.xpath("//android.widget.RelativeLayout[@content-desc=\"唯品会\"]");
    public static final By AiQiCha = By.xpath("//android.widget.RelativeLayout[@content-desc=\"爱企查\"]");
    public static final By DouBao = By.xpath("//android.widget.RelativeLayout[@content-desc=\"豆包\"]");

    public void openAliCloudBox() {
        WebElement el = waitFor(ExpectedConditions.visibilityOfElementLocated(AliCloudBox));
        $(AliCloudBox).click();
    }

    public void openAliCloud() {
        $(AliCloud).click();
    }

    public void openAnJuke() {
        $(AnJuKe).click();
    }

    public void openKuGouMusic() {
        $(KuGouMusic).click();
    }

    public void openZhiLianZhaoPin() {
        $(ZhiLianZhaoPin).click();
    }

    public void openBossZhiPin() {
        $(BossZhiPin).click();
    }

    public void openQianChengWuYou() {
        $(QianChengWuYou).click();
    }

    public void openLaGouZhaoPin() {
        $(LaGouZhaoPin).click();
    }

    public void openWeiPinHui() {
        $(WeiPinHui).click();
    }

    public void openAiQiCha() {
        $(AiQiCha).click();
    }

    public void openDouBao() {
        $(DouBao).click();
    }
}
